AC_SUBST([HAVE_BLUETOOTH],[0])
AC_MSG_RESULT([no])])
-PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION libedataserverui-3.0 >= $LIBEDATASERVERUI_MIN_VERSION gio-2.0)
+PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION gio-2.0)
AC_SUBST(CALENDAR_SERVER_CFLAGS)
AC_SUBST(CALENDAR_SERVER_LIBS)
#include <unistd.h>
#include <gio/gio.h>
-#include <gtk/gtk.h>
#define HANDLE_LIBICAL_MEMORY
#include <libecal/libecal.h>
const gchar *name,
gpointer user_data)
{
+ GMainLoop *main_loop = user_data;
+
g_print ("gnome-shell-calendar-server[%d]: Lost (or failed to acquire) the name " BUS_NAME " - exiting\n",
(gint) getpid ());
- gtk_main_quit ();
+ g_main_loop_quit (main_loop);
}
static void
GIOCondition condition,
gpointer data)
{
+ GMainLoop *main_loop = data;
+
if (condition & G_IO_HUP)
{
g_debug ("gnome-shell-calendar-server[%d]: Got HUP on stdin - exiting\n",
(gint) getpid ());
- gtk_main_quit ();
+ g_main_loop_quit (main_loop);
}
else
{
{
GError *error;
GOptionContext *opt_context;
+ GMainLoop *main_loop;
gint ret;
guint name_owner_id;
GIOChannel *stdin_channel;
name_owner_id = 0;
stdin_channel = NULL;
- /* We need to initialize GTK+ since evolution-data-server may decide to use
- * GTK+ to pop up a dialog box */
- gtk_init (&argc, &argv);
+ g_type_init ();
introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, NULL);
g_assert (introspection_data != NULL);
goto out;
}
+ main_loop = g_main_loop_new (NULL, FALSE);
+
stdin_channel = g_io_channel_unix_new (STDIN_FILENO);
- g_io_add_watch (stdin_channel,
- G_IO_HUP,
- stdin_channel_io_func,
- NULL);
+ g_io_add_watch_full (stdin_channel,
+ G_PRIORITY_DEFAULT,
+ G_IO_HUP,
+ stdin_channel_io_func,
+ g_main_loop_ref (main_loop),
+ (GDestroyNotify) g_main_loop_unref);
name_owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
BUS_NAME,
on_bus_acquired,
on_name_acquired,
on_name_lost,
- NULL,
- NULL);
+ g_main_loop_ref (main_loop),
+ (GDestroyNotify) g_main_loop_unref);
+
+ g_main_loop_run (main_loop);
- gtk_main ();
+ g_main_loop_unref (main_loop);
ret = 0;